package ch.fhnw.kosmonauten.client.gui;

/**
 * Diese Klasse stellt den Text fuer die Hexagram-Linien dar.
 * 
 * @author Fabian Siegrist
 * @author Oliver Freiermuth
 * @author Mikhail Onoufrienko
 * @author Risto Milani
 * @version $Revision: 154 $
 *          File name: $HeadURL: http://iching-kosmonauten.googlecode.com/svn/I-Ching/src/ch/fhnw/kosmonauten/client/gui/LineText.java $
 *          Last modified:$Date: 2013-05-26 02:43:14 +0000 (Sun, 26 May 2013) $
 *          Last modified by: $Author: molotok.mihon@gmail.com $
 */


// class definition
public class LineText extends javax.swing.JFrame {


	private String line;
	// constructors
	/**
	 * Creates new form LineText
	 */
	public LineText() {
		initComponents();
		this.setVisible(true);
	}

	/**
	 * @param Hexagramname
	 * @param Linenumber
	 * @param HexagrammID
	 */
	public LineText(String Hexagramname, String linenumber, String linetext) {
		this.line = linenumber;
		this.toFront();
		this.setAlwaysOnTop(true);

		initComponents();
		this.setTitle("Linie: " + linenumber + " Hexagramm: " + Hexagramname.toUpperCase());
		this.JTextArea1.setText(linetext.replace("<br>", "\n"));
		this.setVisible(true);
	}

	// methods
	/**
	 * This method is called from within the constructor to initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is always
	 * regenerated by the Form Editor.
	 */
	@SuppressWarnings("unchecked")
	// <editor-fold defaultstate="collapsed" desc="Generated Code">
	private void initComponents() {
		jScrollPane1 = new javax.swing.JScrollPane();
		JTextArea1 = new javax.swing.JTextArea();
		JTextArea1.setLineWrap(true);
		JTextArea1.setWrapStyleWord(true);

		setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

		//jTextArea1.setColumns(20);
		//jTextArea1.setRows(5);
		jScrollPane1.setViewportView(JTextArea1);

		javax.swing.GroupLayout layout = new javax.swing.GroupLayout(
				getContentPane());
		getContentPane().setLayout(layout);
		layout.setHorizontalGroup(layout.createParallelGroup(
				javax.swing.GroupLayout.Alignment.LEADING).addComponent(
				jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING,
				javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE));
		layout.setVerticalGroup(layout.createParallelGroup(
				javax.swing.GroupLayout.Alignment.LEADING).addComponent(
				jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 296,
				Short.MAX_VALUE));

		pack();
	}// </editor-fold>


	// Variables declaration - do not modify
	private javax.swing.JScrollPane jScrollPane1;
	//private javax.swing.JTextArea jTextArea1;
	private javax.swing.JTextArea JTextArea1;
	// End of variables declaration
}
